﻿using System;
using System.Xml.Serialization;

namespace Toybox.NicoSharp.Message
{
	using Utilities;

	[XmlRoot("thread")]
	public class Thread : EventArgs
	{

		#region Public Members

		/// <summary>
		/// 取得結果
		/// </summary>
		[XmlAttribute]
		public string resultcode;

		/// <summary>
		/// スレッド
		/// </summary>
		[XmlAttribute]
		public string thread;

		/// <summary>
		/// 最終コメントNo
		/// </summary>
		[XmlAttribute]
		public int last_res;

		/// <summary>
		/// チケット
		/// </summary>
		[XmlAttribute]
		public string ticket;

		/// <summary>
		/// リビジョン
		/// </summary>
		[XmlAttribute]
		public string revision;

		/// <summary>
		/// 投稿者コメント
		/// </summary>
		[XmlAttribute]
		public bool fork;

		/// <summary>
		/// サーバ時間
		/// </summary>
		[XmlAttribute]
		public int server_time;

		/// <summary>
		/// クリックリビジョン
		/// </summary>
		[XmlAttribute]
		public int click_revision;

		/// <summary>
		/// クリック数
		/// </summary>
		[XmlAttribute]
		public int num_clicks;
		
		#endregion Public Members


		#region Public Methods

		public static Thread Deserialize(string xml)
		{
			return Deserializer.XmlDeserializer<Thread>(xml);
		}

		#endregion Public Methods

	}
}